import React, {Component} from "react"
import { Switch,Route,Redirect} from 'react-router-dom'
import { NavLink } from 'react-router-dom'
import Kindlist1 from '@/components/kindlist1.js'
import Kindlist2 from '@/components/kindlist2.js'
import Kindlist3 from '@/components/kindlist3.js'
class Kind extends Component{
    constructor(props) {
        super(props);
        this.state = {

        }
    }



    render() {
        return (
            <div className="kind">
                <ul>
                    <li><NavLink to='/kind/1'>tab1</NavLink></li>
                    <li><NavLink  to='/kind/2'>tab2</NavLink></li>
                    <li><NavLink  to='/kind/3'>tab3</NavLink></li>
                </ul>

                <Switch>
                    <Route path='/kind/1' component={Kindlist1}></Route>
                    <Route path='/kind/2' component={Kindlist2}></Route>
                    <Route path='/kind/3' component={Kindlist3}></Route>
                    <Redirect to='/kind/1'></Redirect>
                </Switch>
            </div>)}

    componentDidMount() {
        console.log(this.props)
    }
}
    export default Kind
